Skip to content

Comments

upgrade go version to 1.24 and fix compatibility issues in client.go …#165

Merged
amitsaha merged 2 commits intoamitsaha:masterfrom
princekinlee:upgrade-go-version
Aug 6, 2025
Merged

upgrade go version to 1.24 and fix compatibility issues in client.go …#165
amitsaha merged 2 commits intoamitsaha:masterfrom
princekinlee:upgrade-go-version

Conversation

@princekinlee
Copy link
Contributor

Summary

This PR upgrades the project from Go 1.19 to Go 1.24, addressing compatibility issues as requested.

Changes Made

Core Updates

  • Updated go.mod to require Go 1.24
  • Ran go mod tidy to update dependencies to compatible versions
  • Fixed type compatibility issues in client.go and repositories_test.go

Specific Fixes

  • Fixed SetApiBaseURL calls: Changed from client.SetApiBaseURL(url.String()) to client.SetApiBaseURL(*url) to match the updated API signature
  • Updated test files: Applied same fixes to repositories_test.go
  • Resolved dependency conflicts: All third-party libraries now work correctly with Go 1.24

Testing Performed

Build & Compilation

  • go build succeeds without errors
  • go test ./... passes all tests
  • No compilation warnings or deprecated function usage

Functional Testing

  • Token authentication: Works correctly with GitHub API
  • Repository backup: Successfully backed up starred and owned repositories
  • Filter options: ignore-fork and other filters working properly
  • Directory structure: Proper github.com/username/repo hierarchy created
  • Git integrity: Backed up repositories are fully functional Git repos

Authentication Methods

  • Environment variable token: GITHUB_TOKEN=xxx method verified
  • OAuth device flow: Attempted (discovered OAuth app configuration issue - see notes)

Notes

OAuth Device Flow Issue

During testing, discovered that the OAuth device flow throws panic: device flow not supported. This appears to be a configuration issue with the OAuth application where device flow may not be enabled in the GitHub OAuth app settings. This doesn't affect core functionality as token authentication works perfectly.

@amitsaha amitsaha requested a review from Copilot August 5, 2025 10:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the Go version from 1.21 to 1.24 and addresses compatibility issues with third-party libraries that arose from the version bump.

  • Updated Go version requirement in go.mod from 1.21 to 1.24
  • Fixed type compatibility issues with Bitbucket client API calls
  • Updated dependencies to versions compatible with Go 1.24

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
go.mod Updated Go version to 1.24 and bumped dependency versions for compatibility
client.go Fixed SetApiBaseURL call to pass URL object instead of string
repositories_test.go Applied same SetApiBaseURL fix in test setup
Comments suppressed due to low confidence (5)

go.mod:3

  • Go 1.24 does not exist. The latest stable Go version as of my knowledge cutoff (January 2025) is Go 1.23. Please verify the intended Go version and update to an existing version like 1.23.
go 1.24

go.mod:35

  • The version v0.40.0 for golang.org/x/crypto appears to be non-existent. As of my knowledge cutoff, versions in the v0.3x range were the latest. Please verify this version exists or use a valid version.
	golang.org/x/crypto v0.40.0 // indirect

go.mod:36

  • The version v0.42.0 for golang.org/x/net appears to be non-existent. As of my knowledge cutoff, versions were in the v0.2x range. Please verify this version exists or use a valid version.
	golang.org/x/net v0.42.0 // indirect

go.mod:37

  • The version v0.34.0 for golang.org/x/sys appears to be non-existent. As of my knowledge cutoff, versions were in the v0.2x range. Please verify this version exists or use a valid version.
	golang.org/x/sys v0.34.0 // indirect

go.mod:38

  • The version v0.33.0 for golang.org/x/term appears to be non-existent. As of my knowledge cutoff, versions were in the v0.2x range. Please verify this version exists or use a valid version.
	golang.org/x/term v0.33.0 // indirect

@amitsaha
Copy link
Owner

amitsaha commented Aug 5, 2025

@princekinlee thank you, could you please update the github actions to run on 1.24 as well as well as update the README?

@princekinlee
Copy link
Contributor Author

  • Upgrade actions/upload-artifact from v3 to v4
  • Upgrade actions/checkout from v3 to v4
  • Upgrade actions/setup-go from v3 to v5
  • Update Go version in CI workflows to 1.24
  • Update README.md to reflect Go 1.24

@amitsaha amitsaha merged commit a56f803 into amitsaha:master Aug 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants